﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RealIceMobile._Default" %>

<%@ Register Assembly="WebControlCaptcha" Namespace="WebControlCaptcha" TagPrefix="cc4" %>


<%@ Register Assembly="MSCaptcha" Namespace="MSCaptcha" TagPrefix="cc3" %>
<%@ Register assembly="C1.Web.iPhone.3" namespace="C1.Web.iPhone.C1ViewPort" tagprefix="cc1" %>
<%@ Register assembly="C1.Web.iPhone.3" namespace="C1.Web.iPhone.C1NavigationList" tagprefix="cc2" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml">

<head id="Head1" runat="server">

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

    <div>

        <asp:ScriptManager ID="ScriptManager1" runat="server">

        </asp:ScriptManager>

        

        

        

        <script language="javascript" type="text/javascript">

        function validateAndSubmitForm() {

            var navList = $find("<%=C1NavigationList1.ClientID%>");



            var device = navList.findItemByCommandName("device_field").get_value();

            var password = navList.findItemByCommandName("password_field").get_value();

            if (device == "") {

                alert("El Numero de Dispositivo está vacío.");

                return;

            } else {

            var myregexp = /^\d{5}$/;

                if (!device.match(myregexp)) {

                    alert("Dispositivo incorrecto.");

                    return;

                }



            }

            if (password == "") {

                alert("El campo de Contraseña está vacío.");

                return;

            }

            __doPostBack();

        }
       

    </script>

<script type="text/javascript"> 
      function Carga(){
      document.getElementById('CaPtChA').innerHTML=document.getElementById('CAPTCHA1').innerHTML;
      }
</script> 
        

        <cc1:C1ViewPort ID="C1ViewPort1" runat="server" Text="Verificación" 

            ToolBarVisible="False" LeftButtonVisibility="Hidden">





        <LeftButton ID="LeftButton"></LeftButton>





            <Content>
               


             <cc2:C1NavigationList ID="C1NavigationList1" runat="server" NavigationListType="RoundedCornersList">

                        
                        <Items>
                        
                        
                            <cc2:C1NavigationListItem ID="ImageLogo" ImageUrl="Img/RealIce.png" ImagePaddingLeft="60px">
                            
                            </cc2:C1NavigationListItem>
                            
                            
                            <cc2:C1NavigationListGroupItem ID="Group" runat="server">

                                <Items>

                                    <cc2:C1NavigationListInputItem ID="device" Text="Dispositivo" CommandName="device_field" 

                                    WaterMarkText="  Introduzca Aqui"></cc2:C1NavigationListInputItem>

                                    <cc2:C1NavigationListInputItem ID="password" Text="Contraseña" CommandName="password_field" 

                                    WaterMarkText="  Introduzca Aqui" TextMode="Password"></cc2:C1NavigationListInputItem>
                                    
                                    <cc2:C1NavigationListInputItem ID="captcha" Text="Captcha" CommandName="captcha_field" 

                                    WaterMarkText="  Introduzca Aqui"></cc2:C1NavigationListInputItem>
                                  
                                </Items>
                                
                                
                                <Items>
                                <cc2:C1NavigationListItem >
                                <Template>
                                <div id="CaPtChA"></div> 
                                    
                                </Template>
                                </cc2:C1NavigationListItem>
                                </Items>

                            </cc2:C1NavigationListGroupItem>

                            <cc2:C1NavigationListTextItem ID="C1NavigationListTextItem1" runat="server"

                                CommandArgument="TextLabel" Text="Introduzca su Número de Dispositivo y Contraseña Arriba.">

                            </cc2:C1NavigationListTextItem>

                           
                            <cc2:C1NavigationListButtonItem ID="C1NavigationListButtonItem1" runat="server" Text="Enviar" OnClientClick="validateAndSubmitForm">

                            </cc2:C1NavigationListButtonItem>

                        </Items>

                        
                </cc2:C1NavigationList>
                

           
            </Content>
            
            <RightButton ID="RightButton" displayvisible="False"></RightButton>
        </cc1:C1ViewPort>
    </div>
    <div id="blah" onclick='Carga()'>
    
    
                <div id="CAPTCHA1" visible="false"> 
            <cc3:CaptchaControl ID="ccJoin" runat="server" CaptchaBackgroundNoise="Low" CaptchaLength="5" 
            CaptchaHeight="32" CaptchaWidth="170" CaptchaLineNoise="Low" CaptchaMinTimeout="5" 
            CaptchaMaxTimeout="240" Visible="true"/>
            </div>
    
    
    
    </div>
    </form>
</body>
</html>


